package com.futureCloudMOM.core.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.futureCloudMOM.core.entity.FBaseEntity;
import com.futureCloudMOM.framework.dict.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Produce_TaskBill", description = "生产订单")
@TableName(value = "Produce_TaskBill")
public class ProduceTaskBill extends FBaseEntity implements Serializable {

    @ApiModelProperty("单据类型")
    @TableField(value = "billType")
    private Long billType;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("任务单号")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "taskBillNo")
    private String taskBillNo;

    @ApiModelProperty("物料")
    @TableField(value = "materialID")
    private Long materialID;

    @ApiModelProperty("单据创建日期")
    @TableField(value = "date")
    private Date date;

    @ApiModelProperty("状态")
    @TableField(value = "status")
    @Dict(dictCode = "produce_task_bill_status")
    private Long status;

    @ApiModelProperty("数量")
    @TableField(value = "qty")
    private BigDecimal qty;

    @ApiModelProperty("报工数量")
    @TableField(value = "reportQty")
    private BigDecimal reportQty;

    @ApiModelProperty("报废数量")
    @TableField(value = "scrapQty")
    private BigDecimal scrapQty;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("备注")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "remark")
    private String remark;

    @ApiModelProperty("计划Id")
    @TableField(value = "planId")
    private Long planId;

    @ApiModelProperty("计划明细Id")
    @TableField(value = "planEntryId")
    private Long planEntryId;

    @ApiModelProperty("工艺路线Id")
    @TableField(value = "routingId")
    private Long routingId;

    @ApiModelProperty("BOMID")
    @TableField(value = "bomId")
    private Long bomId;

    @ApiModelProperty("打印次数")
    @TableField(value = "printQty")
    private BigDecimal printQty;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("生产批次")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "batchNum")
    private String batchNum;

    @ApiModelProperty("父任务Id(拆分自哪个任务)")
    @TableField(value = "parentTaskId")
    private Long parentTaskId;

    @ApiModelProperty("父任务项Id(拆分自哪个任务工序)")
    @TableField(value = "parentTaskSubId")
    private Long parentTaskSubId;

    @ApiModelProperty("计划开始日期")
    @TableField(value = "planStart")
    private Date planStart;

    @ApiModelProperty("计划结束日期")
    @TableField(value = "planEnd")
    private Date planEnd;

    @ApiModelProperty("实际开始日期")
    @TableField(value = "actualStart")
    private Date actualStart;

    @ApiModelProperty("实际结束日期")
    @TableField(value = "actualEnd")
    private Date actualEnd;

    @ApiModelProperty("部门ID")
    @TableField(value = "departmentId")
    private Long departmentId;

    @ApiModelProperty("erp标记（本地建立的为0，erp同步过来的为1）")
    @TableField(value = "erpFlag")
    private Long erpFlag;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("审核人")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "checker")
    private String checker;

    @ApiModelProperty("审核日期")
    @TableField(value = "checkDate")
    private Date checkDate;

    @ApiModelProperty("反工标记")
    @TableField(value = "fgFlag")
    private Long fgFlag;

    @ApiModelProperty("是否放入排产临时表")
    @TableField(value = "statusScheduling")
    private Long statusScheduling;






}

